<div class="layui-card">
    <div class="layui-card-body ">
        <form action=""  class="layui-form">
            <div class="layui-form-item">
                <div class="layui-input-inline">
                    <input type="text" name="keywords" value="{$search.keywords|default=''}" class="layui-input" placeholder="应用名称名称">
                </div>
                <div class="layui-input-inline">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>
                    {if isset($search.keywords)}
                    <a href="javascript:history.go(-1);" class="layui-btn">返回</a>
                    {/if}
                </div>
            </div>
        </form>
        <form action="{:url('admin/steward.apps/delapps')}" method="post" class="layui-form delete-form" id="cp-form">
            <div class="layui-btn-group">
                <a href="{:url('admin/steward.apps/addapps')}" class="layui-btn layui-btn-xs">
                    <i class="layui-icon layui-icon-addition"></i>
                    添加应用
                </a>
                <button data-url="{:url('admin/steward.apps/delapps')}" class="layui-btn layui-btn-xs layui-btn-danger clearExceptionNode">
                    <i class="layui-icon">&#xe640;</i>
                    删除应用
                </button>
            </div>
            <table class="layui-table">
                <thead>
                <tr>
                    <th width="10">
                        <input type="checkbox" class="layui-input"  lay-skin="primary" lay-filter="select-all">
                    </th>
                    <th width="200">应用名称</th>
                    <th width="120">封面Logo</th>
                    <th width="120">状态</th>
                    <th width="120">价格</th>
                    <th width="120">推荐</th>
                    <th width="120">置顶</th>

                    <th width="120">发行时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {volist name="appList" id='v'}
                <tr>
                    <td>
                        <input type="checkbox" name="idList[]" class="layui-input" lay-skin="primary" value="{$v.id}">
                    </td>
                    <td>{$v.app_name}</td>
                    <td>
                        <img src="{:_get_image_preview_url($v.app_photo)}" width="150" height="100" alt="">
                    </td>
                    <td>
                        <input type="checkbox" value="{$v.id}"  data-url="{:url('admin/steward.apps/saveapps')}"  name="app_status" lay-filter="app_status" lay-skin="switch" lay-text="上架|下架" {eq name="$v.app_status" value="1" }checked{/eq}>
                    </td>

                    <td>
                        <p>划线价格：{$v.line_price}元</p>
                        <p>实际价格：{$v.price}元</p>
                    </td>
                    <td>
                        {switch name='v.is_reco'}
                        {case value='0'} <span class="layui-badge-rim">否</span> {/case}
                        {case value='1'} <span class="layui-badge-rim layui-bg-green">是</span> {/case}
                        {/switch}
                    </td>
                    <td>
                        {switch name='v.is_top'}
                        {case value='0'} <span class="layui-badge-rim">否</span> {/case}
                        {case value='1'} <span class="layui-badge-rim layui-bg-green">是</span> {/case}
                        {/switch}
                    </td>
                    <td>{$v.update_time}</td>
                    <td>
                        <a href="{:url('admin/steward.apps/saveapps',['id'=>$v['id']])}" class="layui-btn layui-btn-xs layui-btn-danger ">
                            <i class="layui-icon layui-icon-edit"></i>
                            编辑
                        </a>
                        <a href="{:url('admin/steward.apps/appversion',['app_id'=>$v['id']])}" class="layui-btn layui-btn-xs ">
                            <i class="layui-icon layui-icon-edit"></i>
                            发行包
                        </a>
                    </td>
                </tr>
                {/volist}
                </tbody>
            </table>
            {$appList|raw}
        </form>
    </div>
</div>